package com.zhaoziqian.model;

import com.zhaoziqian.config.CodeEnum;
import com.zhaoziqian.config.StatusEnum;

/**
 * Created with fabric-cli
 * 作者： zhaoziqian
 * 时间： 2018/5/28  下午10:22
 * 功能：
 */
public class SDKResponse {

    private String code;
    private String status ;
    private String msg;

    public static SDKResponse SUCCESS = new SDKResponse(CodeEnum.OK.getCode(), StatusEnum.SUCCESS.getStatus(),"everything is ok");
    public static SDKResponse ERROR = new SDKResponse(CodeEnum.ERROR.getCode(),StatusEnum.ERROR.getStatus(),"something is wrong");

    public SDKResponse() {
    }

    public SDKResponse(String code, String status, String msg) {
        this.code = code;
        this.status = status;
        this.msg = msg;
    }

    public static SDKResponse OK(String msg){
        return new SDKResponse(CodeEnum.OK.getCode(), StatusEnum.SUCCESS.getStatus(),msg);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
